package com.finance.system.request;

import com.finance.base.constant.PatternConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * Created by CBWL on 2017/3/21.
 */
@Data
public class RoleReq {
    private String id;//角色id
    @NotBlank(message = "角色名称不可为空")
    @Length(min=2, max=20,message = "角色名称长度介于2-20")
    private String name;//角色名称
    private String description;//描述
    @Pattern(regexp = PatternConstants.PATTERN_NUMBER_ONE_OR_TWO,message = "传授标识只能是0或1")
    private String authorized;//是否可传授
    @Pattern(regexp = PatternConstants.PATTERN_NUMBER_ONE_OR_TWO,message = "激活状态只能是0或1")
    private String state;//是否激活
    private String menuCode;//菜单code
}
